Support for "bare-user" repo format
authorAlexander Larsson <alexl@redhat.com>
Thu, 4 Dec 2014 10:11:58 +0000 (11:11 +0100)
committerAlexander Larsson <alexl@redhat.com>
Mon, 8 Dec 2014 09:39:39 +0000 (10:39 +0100)
commit47c612e5a0688c3452a125655a245e8f4f01b2b0
tree18ed86a2ff9e58d7bef4a38ae7f1f962ddc9f6af
parent26a47b9ccaabaf1ff13a69fa5b90b9c87e3fb7fc
Support for "bare-user" repo format

This format is pretty much the same as the "bare" format, except the
file ownership and xattrs is not stored in the actual filesystem object, but
rather on the side in a user xattr. This means two things:

1) An unprivileged user can store such a repo independent of the types
   of files in it or their xattrs. And you can later (as root)
   reconstruct the real filesystem tree with ownership. Although you
   can't do that using hardlink-sharing. This also means ostree
   fsck does a full verification.

2) Such a repository can be checked out with user-mode (checkout -U)
   as an unprivileged user using hardlinks for space sharing.

Additionally, symlinks are stored as regular files (with the content
being the symlink target) because user xattrs are not supported on
symlinks. We know at checkout time if the file is a symlink because
the original st_mode is stored in the xattr metadata.

https://bugzilla.gnome.org/show_bug.cgi?id=741125
src/libostree/ostree-core.h
src/libostree/ostree-repo-checkout.c
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo.c